<template>
    <div>
  <el-breadcrumb separator="/" replace=true>
  <el-breadcrumb-item :to="{ path: '/home' }">首页</el-breadcrumb-item>
  <el-breadcrumb-item :to="{ path: '/sku' }">商品规格</el-breadcrumb-item>

</el-breadcrumb>
 <el-button plain @click="add" >添加</el-button>

<skuDialog :isShow="isShow" @cancel ='cancel' :isAdd='isAdd'  ref='diaInfo'/>
<sklulist @edit = 'edit'/>
    </div>
</template>

<script>
import skuDialog from './skuDialog.vue'
import sklulist from './sklulis'
export default {
  // 菜单管理
  data () {
    return {

      isShow: false,
      isAdd: false
    }
  },
  components: {
    skuDialog, sklulist
  },
  methods: {
    add () {
      this.isShow = true
      this.isAdd = true
    },
    cancel () {
      this.isShow = false
    },
    edit (id) {
      console.log(id)
      this.isShow = true

      this.isAdd = false
      this.$refs.diaInfo.lookup(id)
    }
  }
}
</script>

<style scoped>
.el-button{
  margin-top: 20px;
  /* border: 1px solid #b3d8ff;
  background-color: #ecf5ff;
  color: #409eff; */
}
</style>
